package com.adong.tv.data;

import com.adong.tv.model.Category;
import com.adong.tv.model.Movie;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * API响应数据结构
 */
public class ApiResponse {
    
    /**
     * 列表响应
     */
    public static class ListResponse {
        private int code;
        private String msg;
        private String page;
        private int pagecount;
        private String limit;
        private int total;
        private List<Movie> list;

        @SerializedName("class")
        // class 可空怎么写
        private List<Category> classes;  // 注意：API返回的是"class"，但Gson会映射到"classes"
        
        public int getCode() {
            return code;
        }
        
        public void setCode(int code) {
            this.code = code;
        }
        
        public String getMsg() {
            return msg;
        }
        
        public void setMsg(String msg) {
            this.msg = msg;
        }
        
        public String getPage() {
            return page;
        }
        
        public void setPage(String page) {
            this.page = page;
        }
        
        public int getPagecount() {
            return pagecount;
        }
        
        public void setPagecount(int pagecount) {
            this.pagecount = pagecount;
        }
        
        public String getLimit() {
            return limit;
        }
        
        public void setLimit(String limit) {
            this.limit = limit;
        }
        
        public int getTotal() {
            return total;
        }
        
        public void setTotal(int total) {
            this.total = total;
        }
        
        public List<Movie> getList() {
            return list;
        }
        
        public void setList(List<Movie> list) {
            this.list = list;
        }
        
        public List<Category> getClasses() {
            return classes;
        }
        
        public void setClasses(List<Category> classes) {
            this.classes = classes;
        }
    }
    
    /**
     * 详情响应
     */
    public static class DetailResponse {
        private int code;
        private String msg;
        private String page;
        private int pagecount;
        private String limit;
        private int total;
        private List<Movie> list;
        
        public int getCode() {
            return code;
        }
        
        public void setCode(int code) {
            this.code = code;
        }
        
        public String getMsg() {
            return msg;
        }
        
        public void setMsg(String msg) {
            this.msg = msg;
        }
        
        public String getPage() {
            return page;
        }
        
        public void setPage(String page) {
            this.page = page;
        }
        
        public int getPagecount() {
            return pagecount;
        }
        
        public void setPagecount(int pagecount) {
            this.pagecount = pagecount;
        }
        
        public String getLimit() {
            return limit;
        }
        
        public void setLimit(String limit) {
            this.limit = limit;
        }
        
        public int getTotal() {
            return total;
        }
        
        public void setTotal(int total) {
            this.total = total;
        }
        
        public List<Movie> getList() {
            return list;
        }
        
        public void setList(List<Movie> list) {
            this.list = list;
        }
    }
} 